package com.item.service;

import com.item.dao.PostMapper;
import com.item.dao.model.Post;
import com.item.dao.model.PostExample;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PostService {
    @Autowired
    private PostMapper postMapper;

    private static final Logger logger = Logger.getLogger(PostService.class);

    public int countByExample(PostExample example) {
        return this.postMapper.countByExample(example);
    }

    public Post selectByPrimaryKey(String id) {
        return this.postMapper.selectByPrimaryKey(id);
    }

    public List<Post> selectByExample(PostExample example) {
        return this.postMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(String id) {
        return this.postMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Post record) {
        return this.postMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Post record) {
        return this.postMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(PostExample example) {
        return this.postMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(Post record, PostExample example) {
        return this.postMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(Post record, PostExample example) {
        return this.postMapper.updateByExample(record, example);
    }

    public int insert(Post record) {
        return this.postMapper.insert(record);
    }

    public int insertSelective(Post record) {
        return this.postMapper.insertSelective(record);
    }
}